package com.zte;

import org.apache.cordova.DroidGap;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;

public class MainActivity extends DroidGap {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		int ot = getResources().getConfiguration().orientation;
		if (ot == 2) {
			super.setIntegerProperty("splashscreen", R.drawable.splashlandscape);
		} else {
			super.setIntegerProperty("splashscreen", R.drawable.splashportrait);
		}
		loadUrl("file:///android_asset/zte/index.html", 2500);
		// loadUrl("file:///android_asset/zte/testTheme.html", 3000);
	}
	
	/* @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         menu.add(0,1,1,R.string.setting);
         menu.add(0,2,2,R.string.about);
         menu.add(0,3,3,R.string.exit);
         return super.onCreateOptionsMenu(menu);
     }

     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
              
             if(item.getItemId()==1){
                     loadUrl("file:///android_asset/zte/index.html#settingPage");
             }
             if(item.getItemId()==2){
                     loadUrl("file:///android_asset/zte/index.html#aboutPage");
             }
             if(item.getItemId()==3){
                     finish();
             }
             return super.onOptionsItemSelected(item);
     }*/
}